import App from './App'

import {
	api
} from './util/api.js' // API 链接
import {
	post,
	get
} from "./util/http.js"; // 请求方式中间件

import tit from "./pages/components/toptitle.vue";
import qriously from 'vue-qriously';
Vue.component('qriously',qriously)

Vue.component("tit", tit);

Vue.prototype.$post = post;
Vue.prototype.$get = get;
Vue.prototype.$api = api;

// #ifndef VUE3
import Vue from 'vue'
Vue.config.productionTip = false
App.mpType = 'app'
const app = new Vue({
	...App
})
app.$mount()
// #endif

// 封装弹框的方法
uni.$showMsg = function(title = '数据请求失败！', duration = 1500) {
	uni.showToast({
		title,
		duration,
		icon: 'none',
	})
}

import uView from '@/uni_modules/uview-ui'
Vue.use(uView)

// #ifdef VUE3
import {
	createSSRApp
} from 'vue'
export function createApp() {
	const app = createSSRApp(App)
	return {
		app
	}
}
// #endif